package com.xxl.job.admin.service;

import com.xxl.job.core.biz.model.DbInfo;
import com.xxl.job.core.biz.model.ReturnT;

import javax.servlet.http.HttpServletRequest;

public interface DbInfoService {

    /**
     * add dbInfo
     *
     * @param dbInfo
     * @return
     */
    ReturnT<String> add(DbInfo dbInfo);

    /**
     * update dbInfo
     *
     * @param dbInfo
     * @return
     */
    ReturnT<String> update(DbInfo dbInfo);

    /**
     * delete dbInfo
     *
     * @param id
     * @return
     */
    ReturnT<String> remove(Long id);

    /**
     * copy dbInfo
     * @param dbInfo
     * @return
     */
    ReturnT<String> copy(DbInfo dbInfo);

    /**
     * copy dbInfo
     * @param id
     * @return
     */
    ReturnT<String> copy(Long id);

    /**
     * query dbInfo by id
     * @param id
     * @return
     */
    ReturnT<DbInfo> loadById(long id);

    /**
     * test dbInfo
     * @param id
     * @return
     */
    ReturnT<String> testDbInfoById(Long id);

    /**
     * test new dbInfo
     * @param dbInfo
     * @return
     */
    ReturnT<String> testNewDbInfo(DbInfo dbInfo);
}
